<div class="card-pack-item coupon-item">
  {% if cardDetail.targetType == "course" %}
    {% if cardDetail.targetId == 0 %}
      <p class="title">{{'可用于抵扣全站课程'|trans}}</p>
    {% else %}
      <p class="title">{{'用于抵扣指定课程'|trans}}</p>
    {% endif %}
  {% endif %}

  {% if cardDetail.targetType == "classroom" %}
    {% if cardDetail.targetId == 0 %}
    <p class="title">{{'可用于抵扣全站班级'|trans}}</p>
    {% else %}
    <p class="title">{{'可用于抵扣指定班级'|trans}}</p>
    {% endif %}
  {% endif %}

  {% if cardDetail.targetType == "vip" %}
    {% if cardDetail.targetId == 0 %}
      <p class="title">{{'可用于抵扣全站会员'|trans}}</p>
    {% else %}
      <p class="title">{{'用于抵扣指定会员'|trans}}</p>
    {% endif %}
  {% endif %}

  {% if cardDetail.targetType == "all" or cardDetail.targetType == "fullDiscount" %}
    <p class="title">{{'可用于抵扣全站所有类型消费'|trans}}</p>
  {% endif %}

  <p class="price">
    {% if cardDetail.type == "minus" %}￥{% endif %}<strong>{{ cardDetail.rate }}</strong>{% if cardDetail.type == "discount" %}{{'折'|trans}}{% endif %}
    {% if cardDetail.targetType == "course" and cardDetail.targetId != 0 %}<a href="{{ path('course_show',{ id : cardDetail.targetId }) }}">{{'去购买课程'|trans}} ></a>
    {% elseif cardDetail.targetType == "course" and cardDetail.targetId == 0 %}<a href="{{ path('course_explore') }}">{{'去购买课程'|trans}} ></a>
    {% elseif cardDetail.targetType == "vip" %}<a href="{{ path('vip') }}">{{'去开通会员'|trans}} ></a>
    {% elseif cardDetail.targetType == "classroom" and cardDetail.targetId == 0 %}<a href="{{ path('classroom_explore') }}">{{'去购买班级'|trans}} ></a>
    {% elseif cardDetail.targetType == "classroom" and cardDetail.targetId != 0 %}<a href="{{ path('classroom_show',{ id : cardDetail.targetId }) }}">{{'去购买班级'|trans}} ></a>
    {% else %}<a href="{{ path('course_explore') }}">{{'去消费'|trans}} ></a>
    {% endif %}
  </p>
  <p>{{'有效期截止：'|trans}}<span>{{ (cardDetail.deadline)|date('Y') }}{{'年'|trans}}{{ (cardDetail.deadline)|date('n') }}{{'月'|trans}}{{ (cardDetail.deadline)|date('d') }}{{'日'|trans}}</span></p>
  {% if cardDetail.targetType == 'fullDiscount' and cardDetail.fullDiscountPrice %}
    <p>{{'使用条件：'|trans}}<span>满{{ (cardDetail.fullDiscountPrice) }}可用</span></p>
  {% endif %}
</div>
